Skip to content

fix: keep non-ASCII names of uploaded files (backport 2.1 #36812) - #38880

Merged
manerow merged 1 commit into
2.1from
fix/multipart-utf8-filename-2.1
Nov 26, 2026
Merged

manerow merged 1 commit into
2.1from
fix/multipart-utf8-filename-2.1

Conversation

@manerow

@manerow manerow commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Issue

Cherry-pick of #36812 (issue #35918)

What

Uploaded files keep their non-ASCII names. The multipart parser reads part headers as ISO-8859-1, so a name like Отчёт.xlsx arrived garbled. ContextFileUploadSupport.decodeMultipartFileName re-decodes it as UTF-8 at the two upload endpoints (ContextFileResource and AttachmentResource). ASCII names, names that are already correct and bytes that are not valid UTF-8 are left unchanged.

Why

The same bug and the same code exist on 2.1. Same change as #36812 on main.

Verification

  • Clean cherry-pick of the merged commit, identical git patch-id --stable.
  • ContextFileUploadSupportTest passes on this branch (8 tests, 0 failures).

@manerow
manerow requested a review from a team as a code owner November 26, 2026 14:51
@manerow
manerow removed the request for review from a team November 26, 2026 14:51
@manerow manerow added the skip-pr-checks Bypass PR metadata validation check label Nov 26, 2026
@manerow
manerow requested a review from pmbrull November 26, 2026 14:51
@manerow
manerow merged commit 4b4cf9e into 2.1 Nov 26, 2026
34 checks passed
@manerow
manerow deleted the fix/multipart-utf8-filename-2.1 branch November 26, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants